import request from '@/utils/request'

/*            通用 super sub        */
export function getUserByField (params) {
  return request({
    url: '/user/getUserByField',
    method: 'get',
    params
  })
}

export function OCRByIdCard (data) {
  return request({
    url: 'http://60.25.27.35:9999/chatnew/sub/user/OCRByIdCard',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    type: 'form'
  })
}

export function bindKey (data) {
  return request({
    url: '/user/bindKey',
    method: 'post',
    data
  })
}

export function updateUser (data) {
  return request({
    url: '/user/updateUser',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    type: 'form'
  })
}

export function setRemark (data) {
  return request({
    url: '/user/setRemark',
    method: 'post',
    data
  })
}
/*         通用 end          */

/*            super·超管        */
export function getUsersBySub (params) {
  return request({
    url: '/user/getUsersBySub',
    method: 'get',
    params
  })
}
/*         super end         */

/*            sub·代理       */
export function getUsers (params) {
  return request({
    url: '/user/getUsers',
    method: 'get',
    params
  })
}

export function getAllUsers () {
  return request({
    url: '/user/getAllUsers',
    method: 'get'
  })
}

export function setMoney (data) {
  return request({
    url: '/user/setMoney',
    method: 'post',
    data
  })
}

export function setVIPState (data) {
  return request({
    url: '/user/setVIPState',
    method: 'post',
    data
  })
}

export function withdraw (data) {
  return request({
    url: '/user/withdraw',
    method: 'post',
    data
  })
}
/*         sub end         */
